package Demo;

public class Demo_Thread {
    public static void main(String[] args) {
        MyThread mythread = new MyThread();
        mythread.start();
    }
}

class MyThread extends Thread{
    @Override
    public void run() {
        while(true){
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("Thread");

        }
    }
}
